<%-- 
    Document   : listHospital
    Created on : 26 Oct, 2012, 10:57:29 AM
    Author     : sagar
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../common/script.jsp" %>
<!DOCTYPE html>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body>
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div class="in_02">

            <form id="form1" method="post">
                <fieldset style="width:50%; height: 80px; z-index: 999;">
                    <legend>Select options</legend>
                    <table class="formTable">
                        <tr>
                            <td>State:<br/><select id="stateId" name="stateId" class="userInputMedium">
                                    <option value="0">-</option>
                                    <c:forEach items="${stateList}" var="item">
                                        <option <c:if test="${stateId==item.stateId}">selected</c:if> value="${item.stateId}">
                                            ${item.stateName}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>

                            <td>City:<br/><select id="cityId" name="cityId" class="userInputMedium">
                                    <option value="0">-</option>
                                    <c:forEach items="${cityList}" var="item">
                                        <option <c:if test="${cityId==item.cityId}">selected</c:if> value="${item.cityId}">
                                            ${item.cityName}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>

                            <td>Master zone code:<br/><select id="masterZoneId" name="masterZoneId" class="userInputMedium">
                                    <option value="0" >-</option>
                                    <c:forEach items="${masterZoneList}" var="item">
                                        <option <c:if test="${masterZoneId==item.masterZoneId}">selected</c:if> value="${item.masterZoneId}">
                                            ${item.masterZoneCode}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>

                            <td>Zone :<br/><select id="zoneId" name="zoneId" class="userInputMedium">
                                    <option value="0" >-</option>
                                    <c:forEach items="${zoneList}" var="item">
                                        <option <c:if test="${zoneId==item.zoneId}">selected</c:if> value="${item.zoneId}">
                                            ${item.zoneName}
                                        </option>
                                    </c:forEach>
                                </select>
                            </td>
                            
                            <td>TieUp :<br/><select id="tieUpId" name="tieUpId" class="userInputMedium">
                                    <option value="0" >-</option>
                                    <option <c:if test="${tieUpId==1}">selected</c:if> value="1" >HS Tie-up & Lombard</option>
                                    <option <c:if test="${tieUpId==2}">selected</c:if> value="2" >HS Tie-up Only</option>
                                    <option <c:if test="${tieUpId==3}">selected</c:if> value="3" >Lombard Only</option>
                                    <option <c:if test="${tieUpId==4}">selected</c:if> value="4" >None</option>
                                </select>
                            </td>
                            



                            <td><br/><input type="submit" name="GO" value="GO"></td>

                        </tr>
                    </table>
                </fieldset>
            </form>
            <form id="form1">
                <%@include file="../common/message.jsp" %>
                <br/> &nbsp;&nbsp;&nbsp;
                <sec:authorize ifAnyGranted="ROLE_BF_HOSPITAL_ADD">
                    <span style="font-size: 15px; font-weight: bold;"><a href="../hospital/addHospital.htm">Add hospital</a></span>
                </sec:authorize>
                <br/><br/>
                &nbsp;&nbsp;&nbsp;&nbsp;<strong style="margin: 0 1010px 0 0"><spring:message code="title.hospitalList"/></strong>
                <c:out value="${fn:length(filterHospital)}"/> <spring:message code="rowsFound"/>
                <table  class="data_table" border="1px" >
                    <thead>
                        <tr class="header">
    <!--                        <th><spring:message code="hospitalId"/></th>-->
                            <th><spring:message code="hospitalName"/></th>
                            <th ><spring:message code="levelPriority"/></th>
                            <th><spring:message code="tieUp"/></th>
                            <th><spring:message code="depositLess"/></th>
                            <th><spring:message code="ambulanceService"/></th>
                            <th><spring:message code="contact1"/></th>
                            <th><spring:message code="contact2"/></th>
                            <th><spring:message code="zoneName"/></th>
                            <th><spring:message code="masterZoneCode"/></th>
                            <th><spring:message code="cityName"/></th>
                            <th><spring:message code="stateName"/></th>
                            <th width="150px"><spring:message code="hospitalAddress"/></th>
                            <th><spring:message code="ipd"/></th>
                            <th><spring:message code="opd"/></th>
                            <th><spring:message code="dayCare"/></th>
                            <th><spring:message code="diagnostics"/></th>
                            <th><spring:message code="speciality"/></th>
                            <th>&nbsp;</th>
                            <sec:authorize ifAnyGranted="ROLE_BF_HOSPITAL_EDIT">
                            <th>&nbsp;</th>
                            </sec:authorize>
                        </tr>
                    </thead>
                    <tbody>
                        <c:forEach items="${filterHospital}" var="hospitalItem">
                            <tr>
    <!--                            <td ><c:out value="${hospitalItem.HOSPITAL_ID}"/></td>-->
                                <td><c:out value="${hospitalItem.HOSPITAL_NAME}"/></td>
                                <td align="center"><c:out value="${hospitalItem.LEVEL}"/></td>
                                <c:if test="${hospitalItem.TIE_UP_STAGE==3}">
                                    <td><c:out value="Yes"/></td> 
                                </c:if>
                                <c:if test="${hospitalItem.TIE_UP_STAGE<=2}">
                                    <td><c:out value="No"/></td>
                                </c:if>
                                <c:if test="${hospitalItem.DEPOSIT_LESS == 'true' }">
                                    <td><c:out value="Yes"/></td>
                                </c:if>
                                <c:if test="${hospitalItem.DEPOSIT_LESS == 'false' }">
                                    <td><c:out value="No"/></td>
                                </c:if>
                                <td><c:out value="${hospitalItem.AMBULANCE_SERVICE}"/></td>
                                <td><c:out value="${hospitalItem.CONTACT_1}"/></td>
                                <td><c:out value="${hospitalItem.CONTACT_2}"/></td>
                                <td><c:out value="${hospitalItem.ZONE_NAME}"/></td>
                                <td><c:out value="${hospitalItem.MASTER_ZONE_CODE}"/></td>
                                <td><c:out value="${hospitalItem.CITY_NAME}"/></td>
                                <td><c:out value="${hospitalItem.STATE_NAME}"/></td>
                                <td><c:out value="${hospitalItem.HOSPITAL_ADDRESS}"/></td>
                                <td><fmt:formatNumber type="percent" maxIntegerDigits="2" value="${hospitalItem.IPD}" /></td>
                                <td><fmt:formatNumber type="percent" maxIntegerDigits="2" value="${hospitalItem.OPD}" /></td>
                                <td><fmt:formatNumber type="percent" maxIntegerDigits="2" value="${hospitalItem.DAY_CARE}" /></td>
                                <td><fmt:formatNumber type="percent" maxIntegerDigits="2" value="${hospitalItem.DIAGNOSTICS}" /></td>
                                <td><c:out value="${hospitalItem.SPECIALITY}"/></td>


                                <sec:authorize ifAnyGranted="ROLE_BF_HOSPITAL_DETAILS">
                                    <td><a href="showHospitalDetails.htm?hospitalId=<c:out value="${hospitalItem.HOSPITAL_ID}"/>"><img src="../images/show.png"  width="20" height="20" style="border: none" alt="Show" title="Show"/></a></td>
                                        </sec:authorize>
                                        <sec:authorize ifAnyGranted="ROLE_BF_HOSPITAL_EDIT">
                                    <td><a href="updateHospital.htm?hospitalId=<c:out value="${hospitalItem.HOSPITAL_ID}"/>"><img src="../images/edit.png"  width="20" height="20" style="border: none" alt="Edit" title="Edit"/></a></td>
                                        </sec:authorize>
                            </tr>
                        </c:forEach>
                    </tbody>
                </table>
                &nbsp;&nbsp;&nbsp;&nbsp;<c:out value="${fn:length(filterHospital)}"/> <spring:message code="rowsFound"/>
                <br/><br/> &nbsp;&nbsp;&nbsp;
                <sec:authorize ifAnyGranted="ROLE_BF_HOSPITAL_ADD">
                    <span style="font-size: 15px; font-weight: bold;"><a href="../hospital/addHospital.htm">Add hospital</a></span> 
                </sec:authorize>
            </form>
        </div>
    </body>
</html>
